#pragma once

#include "limbo/details/traits.hpp"
#include "mac_address.h"
#include "proto.h"

namespace limbo::ethernet {

template <typename State> struct EthernetContext {
  using ContextState = State;
  using LowerContext = details::lower_context_t<State>;

  MacAddress source = MacAddress::unknown;
  MacAddress destination = MacAddress::unknown;
  EtherType type;
  LowerContext *link_context;
};

template <typename State>
inline auto *get_lower_context(const EthernetContext<State> &ctx) {
  return ctx.link_context;
}

} // namespace limbo::ethernet
